package minimips.isa.itype;

import minimips.computer.Computer;

public class OriInstruction extends RegisterWritingITypeInstruction {

	public OriInstruction(long memoryAddress, int rs, int rt,
			int immediate) {
		super(memoryAddress, 13, "ORI", rs, rt, immediate);
	}

	@Override
	protected int getDestinationRegister() {
		return this.getOpcode() >> 16 & 31;
	}

	@Override
	protected long executeAluOperation(Computer computer) {
		long ori = computer.getId_ex_a().getRegisterValue() | computer.getId_ex_imm().getRegisterValue();
		return ori;
	}

}
